{% extends 'basic_app/master.html' %}
{% block tag_left %}
    {% include 'basic_app/tag_left_user.html' %}
{% endblock %}
{% block userinfo %}
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        <h2 class="page-header">本系统用户的管理页</h2>
        <div class="table-responsive" >
            {#            <form class="navbar-form navbar-left" action="/basic_app/user_search"  role="search" method="post">#}
            <form class="navbar-form navbar-left"   role="search" >

                {#                <button type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"  aria-hidden="true" ></span><a href="/basic_app/user_add"> 添加用户</a></button>#}
                <div class="form-group">
                    <input type="text"  name="user_search" class="form-control aa_search" placeholder="Search">
                </div>
                <button type="buttom" class="btn btn-default" onlick="aa_search()" id="aa_search" aa_search="{{ search }}"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> 搜索</button>
                <button type="button" class="btn btn-default" onclick="javascrtpt:window.location.href='/basic_app/user_add'"><span class="glyphicon glyphicon-plus"  aria-hidden="true" ></span> 添加用户</button>
            </form>
            <table class="table table-striped table-bordered table-hover">
                <thead>
                <tr>
                    {#                    <th>+</th>#}
                    <th>用户名</th>
                    <th>邮箱</th>
                    <th>手机号</th>
                    <th>部门</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {#                {%   for i in userinfo_result %}#}
                {%   for i in current_page %}
                    <tr>
                        {#                        <td><input type="checkbox"/></td>#}
                        <td style="display:none">{{ i.id }}</td>
                        <td>{{ i.username }}</td>
                        <td>{{ i.email }}</td>
                        <td>{{ i.iphone }}</td>
                        <td>{{ i.dept }}</td>
                        <td>{{ i.status }}</td>
                        <td><a href="/basic_app/user_edit?nid={{ i.id }}">编辑</a> | <a href="/basic_app/user_delete?nid={{ i.id }}"  onclick="if(confirm('确认删除吗？')==false)return false;">删除</a> | <a href="/basic_app/user_lock?nid={{ i.id }}">锁定</a> | <a href="/basic_app/user_more?nid={{ i.id }}" >查看详情</a></td>
                    </tr>
                {%  endfor %}
                </tbody>
            </table>
{#        以下是分页#}
 {% include 'basic_app/paginator.html' %}
{#        以上是分页#}
        </div>
    </div>
{% endblock  %}